/**
 * oyt
 */
package com.suliao.home.entity;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author Tao.Ouyang (Create on:2018年7月6日)
 * @version 1.0
 * @fileName TokenSession.java
 */
public class TokenSession implements Serializable {

    private static final long         serialVersionUID = 9036064333285700087L;

    private String                    userName;

    private String                    token;

    private boolean                   tokenFlag;

    private long                      deadline;

    private List<String>              addressList;


    private List<Map<String, Object>> restrictList;

//    private LoginDoorUserDto userinfo;

//    private EnterpriseInfoDto enterprise;                             //公司信息

//    public EnterpriseInfoDto getEnterprise() {
//        return enterprise;
//    }

//    public void setEnterprise(EnterpriseInfoDto enterprise) {
//        this.enterprise = enterprise;
//    }

    public TokenSession(String token, String userName) {
        this.userName = userName;
        this.token = token;
        this.tokenFlag = false;//令牌默认无效
        this.deadline = System.currentTimeMillis() + 3600 * 24 * 7;
        this.addressList = new ArrayList<String>();
//        this.userAuthList = new ArrayList<AuthManagerDto>();
//        this.allAuthList = new ArrayList<AuthManagerDto>();
        this.restrictList = new ArrayList<Map<String, Object>>();
//        this.userinfo = new LoginDoorUserDto();
//        this.enterprise = new EnterpriseInfoDto();
    }

//    public LoginDoorUserDto getUserinfo() {
//        return userinfo;
//    }

//    public void setUserinfo(LoginDoorUserDto userinfo) {
//        this.userinfo = userinfo;
//    }

    public TokenSession() {
        super();
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public long getDeadline() {
        return deadline;
    }

    public void setDeadline(long deadline) {
        this.deadline = deadline;
    }

    public List<String> getAddressList() {
        return addressList;
    }

    public void setAddressList(List<String> addressList) {
        this.addressList = addressList;
    }

    public boolean isTokenFlag() {
        return tokenFlag;
    }

    public void setTokenFlag(boolean tokenFlag) {
        this.tokenFlag = tokenFlag;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

	public List<Map<String, Object>> getRestrictList() {
        return restrictList;
    }

    public void setRestrictList(List<Map<String, Object>> restrictList) {
        this.restrictList = restrictList;
    }


}
